import React, {Component} from 'react';
import {Link, Outlet, Route, Routes} from "react-router-dom";
import MessageDetail from "./MessageDetail";

const messages = [
    {id:1,value:'message001'},
    {id:2,value:'message002'},
    {id:3,value:'message003'},
]
class Message extends Component {
    render() {
        return (
            <div>
                <ul>
                    {messages.map(t=>{
                        return (  <li key={t.id}>
                            <Link to={`/home/message/detail/${t.id}/${t.value}`}>{t.value}</Link>
                        </li>)
                    })}
                </ul>
                <hr/>

                <Outlet/>
            </div>

        );
    }
}

export default Message;